﻿@{
    ViewBag.Title = Local("SiteDomain.SiteInfo");
    Layout = GetPath(SystemDirectory.Shared, "_Dialog.cshtml");
}

@model SiteDomain

@if (IsValided)
{
    using (Html.BeginForm())
    {
        <div class="box">
            <label>@Local("SiteDomain.Domain")</label>
            <div class="right">
            @if (Model != null && Model.SiteID > 0){
                @Html.TextBoxFor(model => model.Domain, new { Readonly = "readonly" })
            }else{
                @Html.TextBoxFor(model => model.Domain)
            }
            </div>
        </div>

        <div class="box">
            <label>@Local("SiteDomain.Enabled")</label>
            <div class="right">
                @Html.CheckBoxFor(model => model.Enabled)
            </div>
        </div>

            if (Model != null && Model.SiteID > 0)
            { 
        <div class="box">
            <label>@Local("SiteDomain.IsDefault")</label>
            <div class="right">
                @Html.CheckBoxFor(model => model.IsDefault)
            </div>
        </div>
            }
    
        <div class="box">
            <label>@Local("SiteDomain.SettingsID")</label>
            <div class="right">
                @Html.TextBoxFor(model => model.SettingsID)
            </div>
        </div>
    
        <div class="box">
            <button class="submit">@Local("SiteDomain.SaveSite")</button>
        </div>
    }
}